<!-- houseItem -->
<template>
  <div @click="clickFn">
    <van-card
      :price="`${obj.price} 元/月 `"
      :desc="obj.desc"
      :title="obj.title"
      :thumb="`http://liufusong.top:8080${obj.houseImg}`"
    >
      <template #tags>
        <van-tag color="#e5f4f7" text-color="#7cc4d1" v-for="(item, index) in obj.tags" :key="index">{{item}}</van-tag>
      </template>
    </van-card>
  </div>
</template>

<script>
export default {
  data () {
    return {
      // houseImg: 'http://liufusong.top:8080'
      item: ''
    }
  },
  props: {
    obj: {
      type: Object
    },
    houseCode: {
      type: String
    }
  },
  methods: {
    clickFn () {
      this.$router.push('/detail/' + this.obj.houseCode)
      localStorage.setItem('item', JSON.stringify(this.obj))
    }
  }
}
</script>
<style lang='less' scoped>
</style>
